<?php
/**
 * Haozhaoya!
 * Copyright (c) 2009-2011 http://www.haozhaoya.com All Right Reserved!
 * Author:KeelDo <keeldo@keeldo.com> 
 */
class ArticleTypeModel extends Model{
	protected $_map=array(
		'i30400139a02cd8fc19db55239fe08c50'=>'at_id',
		'i1935b7399b4f0a4a24ab5a3f43a7e08c'=>'at_name',
		'i3f6e214ac53a6b6628a734da0261df36'=>'at_status',
		'i521124170e361c2704930299b7227862'=>'at_pid',
	);
	protected $fields=array(
		'at_id',
		'at_name',
		'at_status',
		'at_pid',
	);
    protected $_auto=array(
        array('at_status',1),
    );
    public function tree($map=''){
        $rs=$this->where($map)->select();
        $rs=listToTree($rs,'at_id','at_pid');
        return $rs;
        
    }
}
?>